/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package vn.ac.c0910g.assignment.Entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author BachLe
 */
@Entity
@Table(name = "ContactUS")
@NamedQueries({
    @NamedQuery(name = "ContactUS.findAll", query = "SELECT c FROM ContactUS c"),
    @NamedQuery(name = "ContactUS.findByContactID", query = "SELECT c FROM ContactUS c WHERE c.contactID = :contactID"),
    @NamedQuery(name = "ContactUS.findByVisiable", query = "SELECT c FROM ContactUS c WHERE c.visiable = :visiable")})
public class ContactUS implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ContactID")
    private Integer contactID;
    @Basic(optional = false)
    @Lob
    @Column(name = "Contents")
    private String contents;
    @Column(name = "Visiable")
    private Integer visiable;

    public ContactUS() {
    }

    public ContactUS(Integer contactID) {
        this.contactID = contactID;
    }

    public ContactUS(Integer contactID, String contents) {
        this.contactID = contactID;
        this.contents = contents;
    }

    public Integer getContactID() {
        return contactID;
    }

    public void setContactID(Integer contactID) {
        this.contactID = contactID;
    }

    public String getContents() {
        return contents;
    }

    public void setContents(String contents) {
        this.contents = contents;
    }

    public Integer getVisiable() {
        return visiable;
    }

    public void setVisiable(Integer visiable) {
        this.visiable = visiable;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (contactID != null ? contactID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ContactUS)) {
            return false;
        }
        ContactUS other = (ContactUS) object;
        if ((this.contactID == null && other.contactID != null) || (this.contactID != null && !this.contactID.equals(other.contactID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "vn.ac.c0910g.assignment.DAO.ContactUS[contactID=" + contactID + "]";
    }

}
